// Validate ADD form - users
var v = new Validator('users-add-form'); v.EnableMsgsTogether();

v.addValidation('users[full_name]', 'required', 'Full Name - please enter data');
v.addValidation('users[user_name]', 'required', 'Name - please enter data');
v.addValidation('users[user_name]', 'email', 'Name - better to have your email address here');
v.addValidation('users[user_password]', 'required', 'Password - please enter data');
v.addValidation('users[user_password]', 'minlen=5', 'Password - should be least 5 characters long');

/**
* Extra validations - like Agreement
*/
function agreement()
{
	var success = false;
		// checked
		success = true;

	return(success);
}
//v.setAddnlValidationFunction(agreement);

// If jQuery validator is used
// $(document).ready(function(){ $("#users-add-form").validate(); });